package top.tangyh.lamp.care.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;

import java.time.LocalDateTime;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;

import static com.baomidou.mybatisplus.annotation.SqlCondition.EQUAL;
import static top.tangyh.lamp.model.constant.Condition.LIKE;

import top.tangyh.basic.base.entity.Entity;


/**
 * <p>
 * 实体类
 * 观察项记录表
 * </p>
 *
 * @author zqb
 * @date 2024-07-24 15:47:49
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString(callSuper = true)
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@Builder
@TableName("b_obsv_record")
public class BObsvRecord extends Entity<Long> {
    private static final long serialVersionUID = 1L;

    /**
     * 病人识别号
     */
    @TableField(value = "patient_ident", condition = LIKE)
    @Schema(description = "病人识别号")
    private String patientIdent;
    /**
     * 标识,或即观察标识，说明：为生命特征指标编码如spo2
     */
    @TableField(value = "obsv_code", condition = LIKE)
    @Schema(description = "标识,或即观察标识，说明：为生命特征指标编码如spo2")
    private String obsvCode;
    /**
     * 生命体征参数值
     */
    @TableField(value = "prop_value", condition = LIKE)
    @Schema(description = "生命体征参数值")
    private String propValue;
    /**
     * 记录时间
     */
    @TableField(value = "rec_time", condition = EQUAL)
    @Schema(description = "记录时间")
    private Long recTime;
    /**
     * 是否范围内，说明：0 否，1是，默认1
     */
    @TableField(value = "is_range", condition = EQUAL)
    @Schema(description = "是否范围内，说明：0 否，1是，默认1")
    private Integer isRange;
    /**
     * 是否逻辑删除 0-否，1-是，默认是0
     */
    @TableField(value = "is_deleted", condition = EQUAL)
    @Schema(description = "是否逻辑删除 0-否，1-是，默认是0")
    private Integer isDeleted;

    /**
     * 住院号
     */
    @TableField(value = "hospital_number", condition = LIKE)
    @Schema(description = "住院号")
    private String hospitalNumber;
    /**
     * 观察项id
     */
    @TableField(value = "obsv_id", condition = EQUAL)
    @Schema(description = "观察项id")
    private Long obsvId;
    /**
     * 创建时数据来源，说明：dev--来自设备，hand--用户手填
     */
    @TableField(value = "create_source", condition = LIKE)
    @Schema(description = "创建时数据来源，说明：dev--来自设备，hand--用户手填")
    private String createSource;
    /**
     * 采集人
     */
    @TableField(value = "caijiren", condition = LIKE)
    @Schema(description = "采集人")
    private String caijiren;
    /**
     * 采集人工号
     */
    @TableField(value = "caijiren_gh", condition = LIKE)
    @Schema(description = "采集人工号")
    private String caijirenGh;
    /**
     * 无用
     */
    @TableField(value = "is_daiji", condition = EQUAL)
    @Schema(description = "无用")
    private Integer isDaiji;
    /**
     *
     */
    @TableField(value = "is_visible", condition = EQUAL)
    @Schema(description = "是否可见  0否 1 是")
    private Integer isVisible;


    @Schema(description = "纵坐标时间段的值")
    @TableField(exist = false)
    private String diffHour;

    @Schema(description = "某天内于对应的纵坐标时间段值的差值")
    @TableField(exist = false)
    private Integer diffSecond;

    @Schema(description = "用于大便这边查看时间段")
    @TableField(exist = false)
    private String diffDay;

    @Schema(description = "不升字符")
    @TableField(exist = false)
    private String isNotRiseStr;

    @Schema(description = "格式化时间")
    @TableField(exist = false)
    private String recTimeStr;

    @Schema(description = "YY-MM-dd-上午 YY-MM-dd-下午 例：2022-02-15-下午")
    @TableField(exist = false)
    private String diffNoon;

    @Schema(description = "差值")
    @TableField(exist = false)
    private int chaV;

    @Schema(description = "生命体征数据真实的保存时间")
    private LocalDateTime realTime;
}
